home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / HyperCard / HyperCard 1.2.2 International / HyperCard Danish (DK-1.2.2) / Idestakke / Baggrundsideer / background_54528.txt < prev    next >
Text File  |  1988-12-19  |  16KB  |  749 lines

  1. -- background: 54528 from stack: in
  2. -- bmap block id: 49536
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on newStack
  8.   extend
  9. end newStack
  10.  
  11. on extend
  12.   -- type "udvid" into the message box and press return to make
  13.   -- a year's worth of new cards.
  14.   if the name of this stack contains "Baggrundsideer"
  15.   then
  16.   answer "Opret venligst en ny stak, f√∏r den udvides." with "OK"
  17. else
  18.   answer "Skal der laves kort til et nyt √•r?" with "OK" or "Annuller"
  19.   if it is "Annuller" then exit extend
  20.   put 60*60*24 into OneDay        --seconds in a day
  21.   go to last card of this background
  22.   put getStartDate() into start      --what date to begin on
  23.   if start is "Annuller" then exit extend
  24.   if field 16 is not empty then doMenu "New Card"   --don't overwrite
  25.   repeat with cnt = 1 to 12   --months in a year
  26.     put start into it        --a copy
  27.     add OneDay*8 to it   --skip first week
  28.     convert it to long date
  29.     put word 1 of item 2 of it into field "M√•ned"
  30.     put item 3 of it into field "√Ör"
  31.  
  32.     Repeat with index = 1+1 to 35+1
  33.       put start into it
  34.       --convert each day so that date rolls over to "1"
  35.       --at end of month
  36.       convert it to long date
  37.       put (word 2 of item 2 of it) into field index
  38.       add OneDay to start
  39.     end repeat
  40.     doMenu New Card
  41.     add OneDay*8 to start
  42.     put startOfMonth(start) into start
  43.   end repeat
  44.   doMenu "delete card"     --get rid of extra card at end
  45. end if
  46. end extend
  47.  
  48. function getStartDate
  49. -- end of stack this month, whichever is newer
  50. put (field "M√•ned") && "1," && (field "√Ör") into it
  51. if length(it) < 11 then put the date into it
  52. else
  53.   convert it to seconds
  54.   if field 16 is not empty then add 60*60*24*32 to it
  55.   --add 32 days for next month if this month has dates
  56. end if
  57. put startOfMonth(it) into it    --so we can compare
  58. put the date into thisMonth
  59. put startOfMonth(thisMonth) into thisMonth   --both at week starts in seconds
  60. if thisMonth < 2587766400 then
  61.   answer "Indstil Kontrolpanelet til dags dato" with "OK"
  62.   return "Annuller"
  63. end if
  64. if it >= thisMonth then return it   --calendar already beyond today
  65. convert it to short date
  66. convert thisMonth to short date
  67. answer "Startende fra hvilken dato?" with it or thisMonth or "Annuller"
  68. if it is "Annuller" then return it
  69. convert it to seconds
  70. return it
  71. end getStartDate
  72.  
  73. function startOfMonth aDate     -- the seconds of Monday before the 1st
  74. put 60*60*24 into OneDay      --seconds in a day
  75. put aDate into it
  76. convert it to long date
  77. put 1 into word 2 of item 2 of it     --first of month
  78. convert it to seconds
  79. convert it to long date
  80. repeat while item 1 of it <> "S√∏ndag"
  81.   convert it to seconds
  82.   subtract OneDay from it    --look for previous Sunday
  83.   convert it to long date
  84. end repeat
  85. convert it to seconds
  86. return it
  87. end startOfMonth
  88.  
  89. on openBackground
  90.   push recent card
  91. end openBackground
  92.  
  93.  
  94. -- part 5 (field)
  95. -- low flags: 00
  96. -- high flags: 0000
  97. -- rect: left=143 top=42 right=75 bottom=315
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 0 / 0
  100. -- text alignment: 1
  101. -- font id: 2
  102. -- text size: 24
  103. -- style flags: 0
  104. -- line height: 32
  105. -- part name: Måned
  106.  
  107.  
  108. -- part 8 (field)
  109. -- low flags: 00
  110. -- high flags: 0000
  111. -- rect: left=11 top=99 right=141 bottom=80
  112. -- title width / last selected line: 0
  113. -- icon id / first selected line: 0 / 0
  114. -- text alignment: 0
  115. -- font id: 3
  116. -- text size: 9
  117. -- style flags: 0
  118. -- line height: 10
  119. -- part name: 
  120.  
  121.  
  122. -- part 9 (field)
  123. -- low flags: 00
  124. -- high flags: 0000
  125. -- rect: left=79 top=99 right=141 bottom=148
  126. -- title width / last selected line: 0
  127. -- icon id / first selected line: 0 / 0
  128. -- text alignment: 0
  129. -- font id: 3
  130. -- text size: 9
  131. -- style flags: 0
  132. -- line height: 10
  133. -- part name: 
  134.  
  135.  
  136. -- part 10 (field)
  137. -- low flags: 00
  138. -- high flags: 0000
  139. -- rect: left=147 top=99 right=141 bottom=216
  140. -- title width / last selected line: 0
  141. -- icon id / first selected line: 0 / 0
  142. -- text alignment: 0
  143. -- font id: 3
  144. -- text size: 9
  145. -- style flags: 0
  146. -- line height: 10
  147. -- part name: 
  148.  
  149.  
  150. -- part 11 (field)
  151. -- low flags: 00
  152. -- high flags: 0000
  153. -- rect: left=215 top=99 right=141 bottom=284
  154. -- title width / last selected line: 0
  155. -- icon id / first selected line: 0 / 0
  156. -- text alignment: 0
  157. -- font id: 3
  158. -- text size: 9
  159. -- style flags: 0
  160. -- line height: 10
  161. -- part name: 
  162.  
  163.  
  164. -- part 12 (field)
  165. -- low flags: 00
  166. -- high flags: 0000
  167. -- rect: left=283 top=99 right=141 bottom=352
  168. -- title width / last selected line: 0
  169. -- icon id / first selected line: 0 / 0
  170. -- text alignment: 0
  171. -- font id: 3
  172. -- text size: 9
  173. -- style flags: 0
  174. -- line height: 10
  175. -- part name: 
  176.  
  177.  
  178. -- part 13 (field)
  179. -- low flags: 00
  180. -- high flags: 0000
  181. -- rect: left=351 top=99 right=141 bottom=420
  182. -- title width / last selected line: 0
  183. -- icon id / first selected line: 0 / 0
  184. -- text alignment: 0
  185. -- font id: 3
  186. -- text size: 9
  187. -- style flags: 0
  188. -- line height: 10
  189. -- part name: 
  190.  
  191.  
  192. -- part 14 (field)
  193. -- low flags: 00
  194. -- high flags: 0000
  195. -- rect: left=419 top=99 right=141 bottom=488
  196. -- title width / last selected line: 0
  197. -- icon id / first selected line: 0 / 0
  198. -- text alignment: 0
  199. -- font id: 3
  200. -- text size: 9
  201. -- style flags: 0
  202. -- line height: 10
  203. -- part name: 
  204.  
  205.  
  206. -- part 15 (field)
  207. -- low flags: 00
  208. -- high flags: 0000
  209. -- rect: left=11 top=145 right=187 bottom=80
  210. -- title width / last selected line: 0
  211. -- icon id / first selected line: 0 / 0
  212. -- text alignment: 0
  213. -- font id: 3
  214. -- text size: 9
  215. -- style flags: 0
  216. -- line height: 10
  217. -- part name: 
  218.  
  219.  
  220. -- part 16 (field)
  221. -- low flags: 00
  222. -- high flags: 0000
  223. -- rect: left=79 top=145 right=187 bottom=148
  224. -- title width / last selected line: 0
  225. -- icon id / first selected line: 0 / 0
  226. -- text alignment: 0
  227. -- font id: 3
  228. -- text size: 9
  229. -- style flags: 0
  230. -- line height: 10
  231. -- part name: 
  232.  
  233.  
  234. -- part 17 (field)
  235. -- low flags: 00
  236. -- high flags: 0000
  237. -- rect: left=147 top=145 right=187 bottom=216
  238. -- title width / last selected line: 0
  239. -- icon id / first selected line: 0 / 0
  240. -- text alignment: 0
  241. -- font id: 3
  242. -- text size: 9
  243. -- style flags: 0
  244. -- line height: 10
  245. -- part name: 
  246.  
  247.  
  248. -- part 18 (field)
  249. -- low flags: 00
  250. -- high flags: 0000
  251. -- rect: left=215 top=145 right=187 bottom=284
  252. -- title width / last selected line: 0
  253. -- icon id / first selected line: 0 / 0
  254. -- text alignment: 0
  255. -- font id: 3
  256. -- text size: 9
  257. -- style flags: 0
  258. -- line height: 10
  259. -- part name: 
  260.  
  261.  
  262. -- part 19 (field)
  263. -- low flags: 00
  264. -- high flags: 0000
  265. -- rect: left=283 top=145 right=187 bottom=352
  266. -- title width / last selected line: 0
  267. -- icon id / first selected line: 0 / 0
  268. -- text alignment: 0
  269. -- font id: 3
  270. -- text size: 9
  271. -- style flags: 0
  272. -- line height: 10
  273. -- part name: 
  274.  
  275.  
  276. -- part 20 (field)
  277. -- low flags: 00
  278. -- high flags: 0000
  279. -- rect: left=351 top=145 right=187 bottom=420
  280. -- title width / last selected line: 0
  281. -- icon id / first selected line: 0 / 0
  282. -- text alignment: 0
  283. -- font id: 3
  284. -- text size: 9
  285. -- style flags: 0
  286. -- line height: 10
  287. -- part name: 
  288.  
  289.  
  290. -- part 22 (field)
  291. -- low flags: 00
  292. -- high flags: 0000
  293. -- rect: left=419 top=145 right=187 bottom=488
  294. -- title width / last selected line: 0
  295. -- icon id / first selected line: 0 / 0
  296. -- text alignment: 0
  297. -- font id: 3
  298. -- text size: 9
  299. -- style flags: 0
  300. -- line height: 10
  301. -- part name: 
  302.  
  303.  
  304. -- part 23 (field)
  305. -- low flags: 00
  306. -- high flags: 0000
  307. -- rect: left=11 top=191 right=233 bottom=80
  308. -- title width / last selected line: 0
  309. -- icon id / first selected line: 0 / 0
  310. -- text alignment: 0
  311. -- font id: 3
  312. -- text size: 9
  313. -- style flags: 0
  314. -- line height: 10
  315. -- part name: 
  316.  
  317.  
  318. -- part 24 (field)
  319. -- low flags: 00
  320. -- high flags: 0000
  321. -- rect: left=79 top=191 right=233 bottom=148
  322. -- title width / last selected line: 0
  323. -- icon id / first selected line: 0 / 0
  324. -- text alignment: 0
  325. -- font id: 3
  326. -- text size: 9
  327. -- style flags: 0
  328. -- line height: 10
  329. -- part name: 
  330.  
  331.  
  332. -- part 25 (field)
  333. -- low flags: 00
  334. -- high flags: 0000
  335. -- rect: left=147 top=191 right=233 bottom=216
  336. -- title width / last selected line: 0
  337. -- icon id / first selected line: 0 / 0
  338. -- text alignment: 0
  339. -- font id: 3
  340. -- text size: 9
  341. -- style flags: 0
  342. -- line height: 10
  343. -- part name: 
  344.  
  345.  
  346. -- part 26 (field)
  347. -- low flags: 00
  348. -- high flags: 0000
  349. -- rect: left=215 top=191 right=233 bottom=284
  350. -- title width / last selected line: 0
  351. -- icon id / first selected line: 0 / 0
  352. -- text alignment: 0
  353. -- font id: 3
  354. -- text size: 9
  355. -- style flags: 0
  356. -- line height: 10
  357. -- part name: 
  358.  
  359.  
  360. -- part 27 (field)
  361. -- low flags: 00
  362. -- high flags: 0000
  363. -- rect: left=283 top=191 right=233 bottom=352
  364. -- title width / last selected line: 0
  365. -- icon id / first selected line: 0 / 0
  366. -- text alignment: 0
  367. -- font id: 3
  368. -- text size: 9
  369. -- style flags: 0
  370. -- line height: 10
  371. -- part name: 
  372.  
  373.  
  374. -- part 28 (field)
  375. -- low flags: 00
  376. -- high flags: 0000
  377. -- rect: left=351 top=191 right=233 bottom=420
  378. -- title width / last selected line: 0
  379. -- icon id / first selected line: 0 / 0
  380. -- text alignment: 0
  381. -- font id: 3
  382. -- text size: 9
  383. -- style flags: 0
  384. -- line height: 10
  385. -- part name: 
  386.  
  387.  
  388. -- part 29 (field)
  389. -- low flags: 00
  390. -- high flags: 0000
  391. -- rect: left=419 top=191 right=233 bottom=488
  392. -- title width / last selected line: 0
  393. -- icon id / first selected line: 0 / 0
  394. -- text alignment: 0
  395. -- font id: 3
  396. -- text size: 9
  397. -- style flags: 0
  398. -- line height: 10
  399. -- part name: 
  400.  
  401.  
  402. -- part 30 (field)
  403. -- low flags: 00
  404. -- high flags: 0000
  405. -- rect: left=11 top=237 right=279 bottom=80
  406. -- title width / last selected line: 0
  407. -- icon id / first selected line: 0 / 0
  408. -- text alignment: 0
  409. -- font id: 3
  410. -- text size: 9
  411. -- style flags: 0
  412. -- line height: 10
  413. -- part name: 
  414.  
  415.  
  416. -- part 31 (field)
  417. -- low flags: 00
  418. -- high flags: 0000
  419. -- rect: left=79 top=237 right=279 bottom=148
  420. -- title width / last selected line: 0
  421. -- icon id / first selected line: 0 / 0
  422. -- text alignment: 0
  423. -- font id: 3
  424. -- text size: 9
  425. -- style flags: 0
  426. -- line height: 10
  427. -- part name: 
  428.  
  429.  
  430. -- part 32 (field)
  431. -- low flags: 00
  432. -- high flags: 0000
  433. -- rect: left=147 top=237 right=279 bottom=216
  434. -- title width / last selected line: 0
  435. -- icon id / first selected line: 0 / 0
  436. -- text alignment: 0
  437. -- font id: 3
  438. -- text size: 9
  439. -- style flags: 0
  440. -- line height: 10
  441. -- part name: 
  442.  
  443.  
  444. -- part 33 (field)
  445. -- low flags: 00
  446. -- high flags: 0000
  447. -- rect: left=215 top=237 right=279 bottom=284
  448. -- title width / last selected line: 0
  449. -- icon id / first selected line: 0 / 0
  450. -- text alignment: 0
  451. -- font id: 3
  452. -- text size: 9
  453. -- style flags: 0
  454. -- line height: 10
  455. -- part name: 
  456.  
  457.  
  458. -- part 34 (field)
  459. -- low flags: 00
  460. -- high flags: 0000
  461. -- rect: left=283 top=237 right=279 bottom=352
  462. -- title width / last selected line: 0
  463. -- icon id / first selected line: 0 / 0
  464. -- text alignment: 0
  465. -- font id: 3
  466. -- text size: 9
  467. -- style flags: 0
  468. -- line height: 10
  469. -- part name: 
  470.  
  471.  
  472. -- part 35 (field)
  473. -- low flags: 00
  474. -- high flags: 0000
  475. -- rect: left=351 top=237 right=279 bottom=420
  476. -- title width / last selected line: 0
  477. -- icon id / first selected line: 0 / 0
  478. -- text alignment: 0
  479. -- font id: 3
  480. -- text size: 9
  481. -- style flags: 0
  482. -- line height: 10
  483. -- part name: 
  484.  
  485.  
  486. -- part 36 (field)
  487. -- low flags: 00
  488. -- high flags: 0000
  489. -- rect: left=419 top=237 right=279 bottom=488
  490. -- title width / last selected line: 0
  491. -- icon id / first selected line: 0 / 0
  492. -- text alignment: 0
  493. -- font id: 3
  494. -- text size: 9
  495. -- style flags: 0
  496. -- line height: 10
  497. -- part name: 
  498.  
  499.  
  500. -- part 37 (field)
  501. -- low flags: 00
  502. -- high flags: 0000
  503. -- rect: left=11 top=283 right=325 bottom=80
  504. -- title width / last selected line: 0
  505. -- icon id / first selected line: 0 / 0
  506. -- text alignment: 0
  507. -- font id: 3
  508. -- text size: 9
  509. -- style flags: 0
  510. -- line height: 10
  511. -- part name: 
  512.  
  513.  
  514. -- part 38 (field)
  515. -- low flags: 00
  516. -- high flags: 0000
  517. -- rect: left=79 top=283 right=325 bottom=148
  518. -- title width / last selected line: 0
  519. -- icon id / first selected line: 0 / 0
  520. -- text alignment: 0
  521. -- font id: 3
  522. -- text size: 9
  523. -- style flags: 0
  524. -- line height: 10
  525. -- part name: 
  526.  
  527.  
  528. -- part 39 (field)
  529. -- low flags: 00
  530. -- high flags: 0000
  531. -- rect: left=147 top=283 right=325 bottom=216
  532. -- title width / last selected line: 0
  533. -- icon id / first selected line: 0 / 0
  534. -- text alignment: 0
  535. -- font id: 3
  536. -- text size: 9
  537. -- style flags: 0
  538. -- line height: 10
  539. -- part name: 
  540.  
  541.  
  542. -- part 40 (field)
  543. -- low flags: 00
  544. -- high flags: 0000
  545. -- rect: left=215 top=283 right=325 bottom=284
  546. -- title width / last selected line: 0
  547. -- icon id / first selected line: 0 / 0
  548. -- text alignment: 0
  549. -- font id: 3
  550. -- text size: 9
  551. -- style flags: 0
  552. -- line height: 10
  553. -- part name: 
  554.  
  555.  
  556. -- part 41 (field)
  557. -- low flags: 00
  558. -- high flags: 0000
  559. -- rect: left=283 top=283 right=325 bottom=352
  560. -- title width / last selected line: 0
  561. -- icon id / first selected line: 0 / 0
  562. -- text alignment: 0
  563. -- font id: 3
  564. -- text size: 9
  565. -- style flags: 0
  566. -- line height: 10
  567. -- part name: 
  568.  
  569.  
  570. -- part 42 (field)
  571. -- low flags: 00
  572. -- high flags: 0000
  573. -- rect: left=351 top=283 right=325 bottom=420
  574. -- title width / last selected line: 0
  575. -- icon id / first selected line: 0 / 0
  576. -- text alignment: 0
  577. -- font id: 3
  578. -- text size: 9
  579. -- style flags: 0
  580. -- line height: 10
  581. -- part name: 
  582.  
  583.  
  584. -- part 43 (field)
  585. -- low flags: 00
  586. -- high flags: 0000
  587. -- rect: left=419 top=283 right=325 bottom=488
  588. -- title width / last selected line: 0
  589. -- icon id / first selected line: 0 / 0
  590. -- text alignment: 0
  591. -- font id: 3
  592. -- text size: 9
  593. -- style flags: 0
  594. -- line height: 10
  595. -- part name: 
  596.  
  597.  
  598. -- part 44 (button)
  599. -- low flags: 00
  600. -- high flags: 0000
  601. -- rect: left=457 top=44 right=68 bottom=487
  602. -- title width / last selected line: 0
  603. -- icon id / first selected line: 20689 / 20689
  604. -- text alignment: 1
  605. -- font id: 0
  606. -- text size: 12
  607. -- style flags: 0
  608. -- line height: 16
  609. -- part name: gå til hjem
  610. ----- HyperTalk script -----
  611. on mouseUp
  612.   go Home
  613. end mouseUp
  614.  
  615.  
  616.  
  617. -- part 45 (button)
  618. -- low flags: 00
  619. -- high flags: 0000
  620. -- rect: left=382 top=43 right=67 bottom=418
  621. -- title width / last selected line: 0
  622. -- icon id / first selected line: 3430 / 3430
  623. -- text alignment: 1
  624. -- font id: 0
  625. -- text size: 12
  626. -- style flags: 0
  627. -- line height: 16
  628. -- part name: Adresse
  629. ----- HyperTalk script -----
  630. on mouseUp
  631.   get the selection
  632.   visual effect zoom open
  633.   go to "Adresse"
  634.   if it is not empty then find it
  635. end mouseUp
  636.  
  637.  
  638.  
  639. -- part 46 (button)
  640. -- low flags: 00
  641. -- high flags: 0000
  642. -- rect: left=420 top=44 right=72 bottom=453
  643. -- title width / last selected line: 0
  644. -- icon id / first selected line: 4432 / 4432
  645. -- text alignment: 1
  646. -- font id: 0
  647. -- text size: 12
  648. -- style flags: 0
  649. -- line height: 16
  650. -- part name: gå til Opgaver
  651. ----- HyperTalk script -----
  652. on mouseUp
  653.   go to card "Opgaver1" of "Kalender"
  654. end mouseUp
  655.  
  656.  
  657.  
  658. -- part 47 (button)
  659. -- low flags: 00
  660. -- high flags: 0000
  661. -- rect: left=119 top=42 right=67 bottom=146
  662. -- title width / last selected line: 0
  663. -- icon id / first selected line: 1014 / 1014
  664. -- text alignment: 1
  665. -- font id: 0
  666. -- text size: 12
  667. -- style flags: 0
  668. -- line height: 16
  669. -- part name: Prev
  670. ----- HyperTalk script -----
  671. on mouseUp
  672.   visual effect wipe right
  673.   go to previous card
  674. end mouseUp
  675.  
  676.  
  677.  
  678. -- part 48 (button)
  679. -- low flags: 00
  680. -- high flags: 0000
  681. -- rect: left=311 top=42 right=67 bottom=338
  682. -- title width / last selected line: 0
  683. -- icon id / first selected line: 1013 / 1013
  684. -- text alignment: 1
  685. -- font id: 0
  686. -- text size: 12
  687. -- style flags: 0
  688. -- line height: 16
  689. -- part name: Next
  690. ----- HyperTalk script -----
  691. on mouseUp
  692.   visual effect wipe left
  693.   go to next card
  694. end mouseUp
  695.  
  696.  
  697.  
  698. -- part 49 (field)
  699. -- low flags: 00
  700. -- high flags: 0000
  701. -- rect: left=7 top=42 right=75 bottom=107
  702. -- title width / last selected line: 0
  703. -- icon id / first selected line: 0 / 0
  704. -- text alignment: 0
  705. -- font id: 2
  706. -- text size: 24
  707. -- style flags: 0
  708. -- line height: 32
  709. -- part name: År
  710.  
  711.  
  712. -- part 50 (button)
  713. -- low flags: 00
  714. -- high flags: 8000
  715. -- rect: left=448 top=327 right=339 bottom=487
  716. -- title width / last selected line: 0
  717. -- icon id / first selected line: 0 / 0
  718. -- text alignment: 1
  719. -- font id: 3
  720. -- text size: 9
  721. -- style flags: 0
  722. -- line height: 12
  723. -- part name: Udvid
  724. ----- HyperTalk script -----
  725. on mouseUp
  726.   extend
  727. end mouseUp
  728.  
  729.  
  730.  
  731. -- part 51 (button)
  732. -- low flags: 00
  733. -- high flags: 0000
  734. -- rect: left=349 top=42 right=67 bottom=380
  735. -- title width / last selected line: 0
  736. -- icon id / first selected line: 1012 / 1012
  737. -- text alignment: 1
  738. -- font id: 0
  739. -- text size: 12
  740. -- style flags: 0
  741. -- line height: 16
  742. -- part name: Return
  743. ----- HyperTalk script -----
  744. on mouseUp
  745.   visual effect iris close
  746.   pop card
  747. end mouseUp
  748.  
  749.